﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace FurnitureDesign.Core.Models
{
   public class Product
    {
        [Key]
        public int Id { get; set; }

        [Display(Name = "产品名称")]
        [Required(ErrorMessage = "产品名称不能为空")]
        public string ProductName { get; set; }

        [Display(Name = "产品材质")]
        [Required(ErrorMessage = "产品材质不能为空")]
        public string ProductmMterial { get; set; }

        [Display(Name = "产品售价")]
        [Required(ErrorMessage = "产品售价不能为空")]
        public string Price { get; set; }

        [Display(Name = "市场价")]
        [Required(ErrorMessage = "市场价不能为空")]
        public string MarketValue { get; set; }

        [Display(Name = "品牌")]
        [Required(ErrorMessage = "品牌不能为空")]
        public string Brand { get; set; }

        [Display(Name = "颜色")]
        [Required(ErrorMessage = "颜色不能为空")]
        public string Colour { get; set; }

        [Required]
        public int ProductTypeId { get; set; }
        public virtual ProductType  ProductType { get; set; }
    }
}
